unit uConvenio;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, upai, DB, StdCtrls, DBCtrls, Buttons, ExtCtrls, ComCtrls,
  XPMenu, Mask;

type
  TfConvenio = class(TfPai)
    Label1: TLabel;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    Label2: TLabel;
    DBEdit3: TDBEdit;
    Label3: TLabel;
    DBEdit4: TDBEdit;
    Label4: TLabel;
    DBEdit5: TDBEdit;
    Label5: TLabel;
    DBEdit6: TDBEdit;
    Label6: TLabel;
    DBEdit7: TDBEdit;
    Label7: TLabel;
    DBEdit8: TDBEdit;
    Label8: TLabel;
    Label9: TLabel;
    DBEdit9: TDBEdit;
    Label10: TLabel;
    DBEdit10: TDBEdit;
    Label11: TLabel;
    DBEdit11: TDBEdit;
    Label12: TLabel;
    DBEdit12: TDBEdit;
    Label13: TLabel;
    DBEdit13: TDBEdit;
    XPMenu1: TXPMenu;
    DBNavigator1: TDBNavigator;
    Label14: TLabel;
    DBComboBox1: TDBComboBox;
    procedure FormShow(Sender: TObject);
    procedure btnIncluirClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fConvenio: TfConvenio;

implementation

uses UDM;

{$R *.dfm}

procedure TfConvenio.FormShow(Sender: TObject);
begin
  inherited;
  if dm.cds_convenio.Active then
    dm.cds_convenio.Close;
    dm.cds_convenio.Params[0].Clear;
    dm.cds_convenio.Params[1].AsInteger := 9999999;
    dm.cds_convenio.Open;
    btnIncluir.Click;
end;

procedure TfConvenio.btnIncluirClick(Sender: TObject);
begin
  inherited;
  DBComboBox1.SetFocus;
end;

end.
